home *** CD-ROM | disk | FTP | other *** search
/ Maximum CD 2000 September / maximum-cd-2000-09.iso / Vampire the Masquerade / vampire_demo.exe / Codex.nob / FlyRegion.class (.txt) < prev    next >
Encoding:
Java Class File  |  2000-06-22  |  1.4 KB  |  33 lines

  1. public class FlyRegion extends Codex {
  2.    private String _pathName;
  3.    private float _speed;
  4.    private boolean bRun;
  5.    public static String[] _params = new String[]{"Path name", "Speed;120"};
  6.  
  7.    public FlyRegion(String pathName, float speed) {
  8.       this._pathName = pathName;
  9.       this._speed = speed;
  10.    }
  11.  
  12.    public void restore(int flags) {
  13.       this.bRun = CodexSequence.RestoreBoolean();
  14.    }
  15.  
  16.    public void entered(int guid, int causeGUID, int captureID) {
  17.       if (Codex.IsPlayerGuid(causeGUID)) {
  18.          if (!this.bRun) {
  19.             CodexCamera.PlayPath(CodexPlayer.GetCurrentPlayer(), ((Codex)this).GetGUID(), this._pathName, this._speed);
  20.             this.bRun = true;
  21.          }
  22.       }
  23.    }
  24.  
  25.    public void save(int flags) {
  26.       CodexSequence.SaveBoolean(this.bRun);
  27.    }
  28.  
  29.    public void pathended(int clientGuid) {
  30.       CodexCamera.Release(0);
  31.    }
  32. }
  33.